package com.ruoyi.mongo.word.service;


import com.mongodb.client.result.UpdateResult;
import com.ruoyi.mongo.config.QueryForm;
import com.ruoyi.mongo.word.entity.*;

import java.util.ArrayList;
import java.util.List;

public interface WordListMongoInterface {
    List<?> getAllListData(String collectionName);

    List<?> getAllListDataByPage(String collectionName, int pageNum, int pageSize);

    List<?> getAllListDataByUnit(String collectionName, String unit, String book);

    <T> List<?> getAllListData(T t, String collectionName, String unit, String book);

    List<?> getAllListDataByUnitCheck(String collectionName, String unit);

    List<?> getAllListDataByUnitCheck(String collectionName, String unit, String book, int times,Integer pageNum);

    /**
     * 听力练习
     * 默认条数-30
     * 列表
     */
    List<?> getHearList(Integer times);

    /**
     * 听力练习
     * 通过分组(1-50)
     * 列表
     */
    List<?> getHearListByGroup(String group);

    /**
     * 听力练习
     * 查询
     * 单个记录
     * 需要修改
     */
    WordHearRecord getHearOne(String id);

    /**
     * 听力练习
     * 保存
     * 单个记录
     */
    void putHearData(WordHearRecord entity);

    void updateHearData(WordHearRecord entity);

    List<?> getAllListDataByPage(String collectionName, QueryForm queryForm);

    List<?> getListData(String collectionName, String type);

    void insertTestList(List<WordTestEntity> list, String collectionName);

    void removeTestData(String collectionName, String id);

    WordStudyEntity insertStudyData(WordStudyEntity entity, String collectionName);

    void insertStudyData(WordChinToEngEntity entity, String collectionName);

    void insertStudyList(List<WordStudyEntity> list, String collectionName);

    ArrayList<UpdateResult> insertOrUpdateTestList(WordTestEntity item, String collectionName);

    ArrayList<UpdateResult> insertOrUpdateTestList(List<WordTestEntity> list, String collectionName);

    List<?> getListTestData(String collectionName, String type, String book, Integer pageNum);

    List<?> getListTestData(String collectionName, String type, String book, String unit, Integer pageNum);

    List<?> getTestDetailsList(String status, String practice,int way);

    List<?> getWriteDetailsList(String status, String practice);

    List<?> getWriteDetailsList(int user, String practice);

    List<?> getTestDetailsListByUser(int userId, int way,String type, String practice);

    List<?> getStudyDetailsListByUser(int userId, String practice,int way);

    List<?> getHearDetailsList(String status, String practice);

    List<?> getHearDetailsListByUser(int userId, String practice);

    List<?> getListStudyData(String collectionName, String unit, String book, Integer pageNum);

    void insertCheckRecord(WordCheckRecordEntity entity, String collectionCheckRecord);
}
